package observer.main;

/**
 * 销售管理系统
 * observer.main
 * 测试
 * 2018/8/3-16:36
 * 科达科技股份有限公司-版权所有
 * Created by wuqiang on 16:36.
 */
public class MainTest {

    public static void main(String[] args) {
        WeatherData weatherData=new WeatherData();
        CurrentConditon currentConditon=new CurrentConditon();
        weatherData.registerObserver(currentConditon);//注册一个观察者

        weatherData.setMeasurements(100D,200D,300D);
        currentConditon.display();//观察

        weatherData.setMeasurements(10D,20D,30D);
        currentConditon.display();//观察
    }

}
